package Campus.help.task.dao;

import Campus.help.task.entity.TaskInfo;
import Campus.help.task.vo.OrderInHallVo;
import Campus.help.task.vo.orderInfoVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author haoyun.xiong
 * @since 2023-04-08
 */
public interface TaskInfoMapper extends BaseMapper<TaskInfo> {
    List<OrderInHallVo> getOrderInHall(@Param("begin") int page, @Param("size") int size);

    List<TaskInfo> getOrdersById(@Param("id") Long id);

    int addNewTask(Map<String,Object> map);

    List<OrderInHallVo> getOrderByStatus(@Param("id") Long id, @Param("status") int status);

    List<OrderInHallVo> getSelfOrderByStatus(Long id, String status);

    TaskInfo getTaskInfoStatusByNumber(@Param("orderNumber") String orderNumber);

    orderInfoVo getInfoByNum(String orderNumber);

    int totalSize();

    Long getReceiverInfoByTaskId(Long id);

    boolean payfor(@Param("id") Long id,@Param("payTime") LocalDateTime payTime);

    List<OrderInHallVo> getcontinue(Long id);

    void OrderMonitoring(LocalDateTime nowTime);

    TaskInfo findById(Long orderId);
}
